package com.zuo.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;

/**
 * @Author 白白旧维
 * @Date 2022/2/28 18:32
 */
public class User {

    private int uid;
    private String uname;
    private String username;
    private String password;
    private int status;
    private Date createTime;
    private String faceUrl;
    private String facePath;
    private List<Bulletin> bulletinList;
    private List<Doc> docList;
    private String cTime;

    public User() {
        this.bulletinList = new ArrayList<>();
        this.docList = new ArrayList<>();
    }

    public User(int uid, String uname, String username, String password, int status, Date createTime, String faceUrl, String facePath, List<Bulletin> bulletinList, List<Doc> docList) {
        this.uid = uid;
        this.uname = uname;
        this.username = username;
        this.password = password;
        this.status = status;
        this.createTime = createTime;
        this.faceUrl = faceUrl;
        this.facePath = facePath;
        this.bulletinList = bulletinList;
        this.docList = docList;
    }

    public String getcTime() {
        return cTime;
    }

    public void setcTime(String cTime) {
        this.cTime = cTime;
    }

    public String getFaceUrl() {
        return faceUrl;
    }

    public void setFaceUrl(String faceUrl) {
        this.faceUrl = faceUrl;
    }

    public String getFacePath() {
        return facePath;
    }

    public void setFacePath(String facePath) {
        this.facePath = facePath;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public String getUname() {
        return uname;
    }

    public void setUname(String uname) {
        this.uname = uname;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public List<Bulletin> getBulletinList() {
        return bulletinList;
    }

    public void setBulletinList(List<Bulletin> bulletinList) {
        this.bulletinList = bulletinList;
    }

    public List<Doc> getDocList() {
        return docList;
    }

    public void setDocList(List<Doc> docList) {
        this.docList = docList;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return uid == user.uid &&
                status == user.status &&
                Objects.equals(uname, user.uname) &&
                Objects.equals(username, user.username) &&
                Objects.equals(password, user.password) &&
                Objects.equals(createTime, user.createTime) &&
                Objects.equals(faceUrl, user.faceUrl) &&
                Objects.equals(facePath, user.facePath) &&
                Objects.equals(bulletinList, user.bulletinList) &&
                Objects.equals(docList, user.docList);
    }

    @Override
    public int hashCode() {
        return Objects.hash(uid, uname, username, password, status, createTime, faceUrl, facePath, bulletinList, docList);
    }

    @Override
    public String toString() {
        return "User{" +
                "uid=" + uid +
                ", uname='" + uname + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", status=" + status +
                ", createTime=" + createTime +
                ", faceUrl='" + faceUrl + '\'' +
                ", facePath='" + facePath + '\'' +
                ", bulletinList=" + bulletinList +
                ", docList=" + docList +
                '}';
    }
}
